home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 7 / Amiga Format AFCD07 (Dec 1996, Issue 91).iso / serious / shareware / programming / emacs-complete / fsf / emacs / info / emacs-8 < prev    next >
Encoding:
GNU Info File  |  1994-10-06  |  48.7 KB  |  1,213 lines

  1. This is Info file ../info/emacs, produced by Makeinfo-1.54 from the
  2. input file emacs.texi.
  3.  
  4. 
  5. File: emacs,  Node: Frames,  Next: Major Modes,  Prev: Windows,  Up: Top
  6.  
  7. Frames and X Windows
  8. ********************
  9.  
  10.    When using the X Window System, you can create multiple windows at
  11. the X level in a single Emacs session.  Each X window that belongs to
  12. Emacs displays a "frame" which can contain one or several Emacs windows.
  13. A frame initially contains a single general-purpose Emacs window which
  14. you can subdivide vertically or horizontally into smaller windows.  A
  15. frame normally contains its own echo area and minibuffer, but you can
  16. make frames that don't have these--they use the echo area and
  17. minibuffer of another frame.
  18.  
  19.    Editing you do in one frame also affects the other frames.  For
  20. instance, if you put text in the kill ring in one frame, you can yank it
  21. in another frame.  If you exit Emacs through `C-x C-c' in one frame, it
  22. terminates all the frames.  To delete just one frame, use `C-x 5 0'.
  23.  
  24.    To avoid confusion, we reserve the word "window" for the
  25. subdivisions that Emacs implements, and never use it to refer to a
  26. frame.
  27.  
  28. * Menu:
  29.  
  30. * Mouse Commands::     Moving, cutting, and pasting, with the mouse.
  31. * Secondary Selection::Cutting without altering point and mark.
  32. * Mouse References::   Using the mouse to select an item from a list.
  33. * Mode Line Mouse::    Mouse clicks on the mode line.
  34. * Creating Frames::    Creating additional Emacs frames with various contents.
  35. * Special Buffer Frames::  You can make certain buffers have their own frames.
  36. * Frame Parameters::   Changing the colors and other modes of frames.
  37. * Scroll Bars::           How to enable and disable scroll bars; how to use them.
  38. * Menu Bars::           Enabling and disabling the menu bar.
  39. * Faces::           How to change the display style using faces.
  40. * Modifying Faces::    How to change what a particular face looks like.
  41. * Misc X::           Iconifying and deleting frames.    Region highlighting.
  42.  
  43. 
  44. File: emacs,  Node: Mouse Commands,  Next: Secondary Selection,  Up: Frames
  45.  
  46. Mouse Commands
  47. ==============
  48.  
  49.    The mouse commands for selecting and copying a region are mostly
  50. compatible with the `xterm' program.  You can use the same mouse
  51. commands for copying between Emacs and other X client programs.
  52.  
  53. `Mouse-1'
  54.      Move point to where you click (`mouse-set-point').  This is
  55.      normally the left button.
  56.  
  57. `Drag-Mouse-1'
  58.      Set the region to the text you select by dragging, and copy it to
  59.      the kill ring (`mouse-set-region').  You can specify both ends of
  60.      the region with this single command.
  61.  
  62.      If you move the mouse off the top or bottom of the window while
  63.      dragging, the window scrolls at a steady rate until you move the
  64.      mouse back into the window.  This way, you can select regions that
  65.      don't fit entirely on the screen.
  66.  
  67. `Mouse-2'
  68.      Yank the last killed text, where you click (`mouse-yank-at-click').
  69.      This is normally the middle button.
  70.  
  71. `Mouse-3'
  72.      This command, `mouse-save-then-kill', has several functions
  73.      depending on where you click and the status of the region.
  74.  
  75.      If you have a highlighted region, or if the region was set just
  76.      before by dragging button 1, `Mouse-3' adjusts the nearer end of
  77.      the region by moving it to where you click.  The adjusted region's
  78.      text also replaces the old region's text in the kill ring.
  79.  
  80.      Otherwise, `Mouse-3' sets mark where you click, without changing
  81.      point.  It copies the new region to the kill ring.
  82.  
  83.      If you originally specified the region using a double or triple
  84.      `Mouse-1', so that the region is defined to consist of entire words
  85.      or lines, then adjusting the region also proceeds by entire words
  86.      or lines.
  87.  
  88.      If you use `Mouse-3' twice in a row at the same place, that kills
  89.      the region already selected.
  90.  
  91. `Double-Mouse-1'
  92.      This key sets the region around the word which you click on.
  93.  
  94. `Double-Drag-Mouse-1'
  95.      This key selects a region made up of the words that you drag
  96.      across.
  97.  
  98. `Triple-Mouse-1'
  99.      This key sets the region around the line which you click on.
  100.  
  101. `Triple-Drag-Mouse-1'
  102.      This key selects a region made up of the lines that you drag
  103.      across.
  104.  
  105.    The simplest way to kill text with the mouse is to press `Mouse-1'
  106. at one end, then press `Mouse-3' twice at the other end.  *Note
  107. Killing::.  To copy the text into the kill ring without deleting it
  108. from the buffer, press `Mouse-3' just once--or just drag across the
  109. text with `Mouse-1'.  Then you can copy it elsewhere by yanking it.
  110.  
  111.    To yank the killed or copied text somewhere else, move the mouse
  112. there and press `Mouse-2'.  *Note Yanking::.  However, if
  113. `mouse-yank-at-point' is non-`nil', `Mouse-2' yanks at point.  Then it
  114. does not matter precisely where you click; all that matters is which
  115. window you click on.  The default value is `nil'.  This variable also
  116. effects yanking the secondary selection.
  117.  
  118.    To copy text to another X window, kill it or save it in the kill
  119. ring.  Under X, this also sets the "primary selection".  Then use the
  120. "paste" or "yank" command of the program operating the other window to
  121. insert the text from the selection.
  122.  
  123.    To copy text from another X window, use the "cut" or "copy" command
  124. of the program operating the other window, to select the text you want.
  125. Then yank it in Emacs with `C-y' or `Mouse-2'.
  126.  
  127.    When Emacs puts text into the kill ring, or rotates text to the front
  128. of the kill ring, it sets the "primary selection" in the X server.
  129. This is how other X clients can access the text.  Emacs also stores the
  130. text in the cut buffer, but only if the text is short enough
  131. (`x-cut-buffer-max' specifies the maximum number of characters);
  132. putting long strings in the cut buffer can be slow.
  133.  
  134.    The commands to yank the first entry in the kill ring actually check
  135. first for a primary selection in another program; after that, they check
  136. for text in the cut buffer.  If neither of those sources provides text
  137. to yank, the kill ring contents are used.
  138.  
  139. 
  140. File: emacs,  Node: Secondary Selection,  Next: Mouse References,  Prev: Mouse Commands,  Up: Frames
  141.  
  142. Secondary Selection
  143. ===================
  144.  
  145.    The "secondary selection" is another way of selecting text using X.
  146. It does not use point or the mark, so you can use it to kill text
  147. without setting point or the mark.
  148.  
  149. `M-Drag-Mouse-1'
  150.      Set the secondary selection, with one end at the place where you
  151.      press down the button, and the other end at the place where you
  152.      release it (`mouse-set-secondary').  The highlighting appears and
  153.      changes as you drag.
  154.  
  155.      If you move the mouse off the top or bottom of the window while
  156.      dragging, the window scrolls at a steady rate until you move the
  157.      mouse back into the window.  This way, you can mark regions that
  158.      don't fit entirely on the screen.
  159.  
  160. `M-Mouse-1'
  161.      Set one endpoint for the "secondary selection"
  162.      (`mouse-start-secondary').
  163.  
  164. `M-Mouse-3'
  165.      Make a secondary selection, using the place specified with
  166.      `M-Mouse-1' as the other end (`mouse-secondary-save-then-kill').
  167.      A second click at the same place kills the secondary selection
  168.      just made.
  169.  
  170. `M-Mouse-2'
  171.      Insert the secondary selection where you click
  172.      (`mouse-kill-secondary').  This places point at the end of the
  173.      yanked text.
  174.  
  175.    Double or triple clicking of `M-Mouse-1' operates on words and
  176. lines, much like `Mouse-1'.
  177.  
  178.    If `mouse-yank-at-point' is non-`nil', `M-Mouse-2' yanks at point.
  179. Then it does not matter precisely where you click; all that matters is
  180. which window you click on.  *Note Mouse Commands::.
  181.  
  182. 
  183. File: emacs,  Node: Mouse References,  Next: Mode Line Mouse,  Prev: Secondary Selection,  Up: Frames
  184.  
  185. Following References with the Mouse
  186. ===================================
  187.  
  188.    Some Emacs buffers display lists of various sorts.  These include
  189. lists of files, of buffers, of possible completions, of matches for a
  190. pattern, and so on.
  191.  
  192.    Since yanking text into these buffers is not very useful, most of
  193. them define `Mouse-2' specially, as a command to use or view the item
  194. you click on.
  195.  
  196.    For example, if you click `Mouse-2' on a file name in a Dired
  197. buffer, you visit the that file.  If you click `Mouse-2' on an error
  198. message in the `*Compilation*' buffer, you go to the source code for
  199. that error message.  If you click `Mouse-2' on a completion in the
  200. `*Completions*' buffer, you choose that completion.
  201.  
  202.    You can usually tell when `Mouse-2' has this special sort of meaning
  203. because the sensitive text highlights when you move the mouse over it.
  204.  
  205. 
  206. File: emacs,  Node: Mode Line Mouse,  Next: Creating Frames,  Prev: Mouse References,  Up: Frames
  207.  
  208. Mode Line Mouse Commands
  209. ========================
  210.  
  211.    You can use mouse clicks on window mode lines to select and
  212. manipulate windows.
  213.  
  214. `Mouse-1'
  215.      `Mouse-1' on a mode line selects the window above.  By dragging
  216.      `Mouse-1' on the mode line, you can move it, thus changing the
  217.      height of the windows above and below.
  218.  
  219. `Mouse-2'
  220.      `Mouse-2' on a mode line expands that window to fill its frame.
  221.  
  222. `Mouse-3'
  223.      `Mouse-3' on a mode line deletes the window above.
  224.  
  225. `C-Mouse-2'
  226.      `C-Mouse-2' on a mode line splits the window above horizontally,
  227.      above the place in the mode line where you click.
  228.  
  229.    `C-Mouse-2' on a scroll bar splits the corresponding window
  230. vertically.  *Note Split Window::.
  231.  
  232. 
  233. File: emacs,  Node: Creating Frames,  Next: Special Buffer Frames,  Prev: Mode Line Mouse,  Up: Frames
  234.  
  235. Creating Frames
  236. ===============
  237.  
  238.    The prefix key `C-x 5' is analogous to `C-x 4', with parallel
  239. subcommands.  The difference is that `C-x 5' commands create a new
  240. frame rather than just a new window in the selected frame  (*Note Pop
  241. Up Window::).  If an existing visible or iconified frame already
  242. displays the requested material, these commands use the existing frame,
  243. after raising or deiconifying as necessary.
  244.  
  245.    The various `C-x 5' commands differ in how they find or create the
  246. buffer to select:
  247.  
  248. `C-x 5 2'
  249.      Create a new frame (`make-frame').
  250.  
  251. `C-x 5 b BUFNAME RET'
  252.      Select buffer BUFNAME in another window.  This runs
  253.      `switch-to-buffer-other-frame'.
  254.  
  255. `C-x 5 f FILENAME RET'
  256.      Visit file FILENAME and select its buffer in another frame.  This
  257.      runs `find-file-other-frame'.  *Note Visiting::.
  258.  
  259. `C-x 5 d DIRECTORY RET'
  260.      Select a Dired buffer for directory DIRECTORY in another frame.
  261.      This runs `dired-other-frame'.  *Note Dired::.
  262.  
  263. `C-x 5 m'
  264.      Start composing a mail message in another frame.  This runs
  265.      `mail-other-frame'.  It is the other-frame variant of `C-x m'.
  266.      *Note Sending Mail::.
  267.  
  268. `C-x 5 .'
  269.      Find a tag in the current tag table in another frame.  This runs
  270.      `find-tag-other-frame', the multiple-frame variant of `M-.'.
  271.      *Note Tags::.
  272.  
  273. `C-x 5 r FILENAME RET'
  274.      Visit file FILENAME read-only, and select its buffer in another
  275.      frame.  This runs `find-file-read-only-other-frame'.  *Note
  276.      Visiting::.
  277.  
  278.    You can control the appearance of new frames you create by setting
  279. the frame parameters in `default-frame-alist'.  You can use the
  280. variable `initial-frame-alist' to specify parameters that affect only
  281. the initial frame.  *Note Initial Parameters: (elisp)Initial
  282. Parameters, for more information.
  283.  
  284. 
  285. File: emacs,  Node: Special Buffer Frames,  Next: Frame Parameters,  Prev: Creating Frames,  Up: Frames
  286.  
  287. Special Buffer Frames
  288. =====================
  289.  
  290.    You can make certain chosen buffers, for which Emacs normally creates
  291. a second window when you have just one window, appear in special frames
  292. of their own.  To do this, set the variable
  293. `special-display-buffer-names' to a list of buffer names; any buffer
  294. whose name is in that list automatically gets a special frame when it
  295. is to be displayed in another window.
  296.  
  297.    For example, if you set the variable this way,
  298.  
  299.      (setq special-display-buffer-names
  300.            '("*Completions*" "*grep*" "*tex-shell*"))
  301.  
  302. then completion lists, `grep' output and the TeX mode shell buffer get
  303. individual frames of their own.  These frames, and the windows in them,
  304. are never automatically split or reused for any other buffers.  They
  305. continue to show the buffers they were created for, unless you alter
  306. them by hand.  Killing the special buffer deletes its frame
  307. automatically.
  308.  
  309.    More generally, you can set `special-display-regexps' to a list of
  310. regular expressions; then a buffer gets its own frame if its name
  311. matches any of those regular expressions. (Once again, this applies only
  312. to buffers that normally get displayed for you in a separate window.)
  313.  
  314.    The variable `special-display-frame-alist' specifies the frame
  315. parameters for these frames.  It has a default value, so you don't need
  316. to set it.
  317.  
  318. 
  319. File: emacs,  Node: Frame Parameters,  Next: Scroll Bars,  Prev: Special Buffer Frames,  Up: Frames
  320.  
  321. Setting Frame Parameters
  322. ========================
  323.  
  324.    This section describes commands for altering the display style and
  325. window management behavior of the selected frame.
  326.  
  327. `M-x set-foreground-color RET COLOR RET'
  328.      Specify color COLOR for the foreground of the selected frame.
  329.  
  330. `M-x set-background-color RET COLOR RET'
  331.      Specify color COLOR for the background of the selected frame.
  332.  
  333. `M-x set-cursor-color RET COLOR RET'
  334.      Specify color COLOR for the cursor of the selected frame.
  335.  
  336. `M-x set-mouse-color RET COLOR RET'
  337.      Specify color COLOR for the mouse cursor when it is over the
  338.      selected frame.
  339.  
  340. `M-x set-border-color RET COLOR RET'
  341.      Specify color COLOR for the border of the selected frame.
  342.  
  343. `M-x auto-raise-mode'
  344.      Toggle whether or not the selected frame should auto-raise.
  345.      Auto-raise means that every time you move the mouse onto the
  346.      frame, it raises the frame.
  347.  
  348.      Note that this auto-raise feature is implemented by Emacs itself.
  349.      Some window managers also implement auto-raise.  If you enable
  350.      auto-raise for Emacs frames in your X window manager, it should
  351.      work, but it is beyond Emacs's control and therefore
  352.      `auto-raise-mode' has no effect on it.
  353.  
  354. `M-x auto-lower-mode'
  355.      Toggle whether or not the selected frame should auto-lower.
  356.      Auto-lower means that every time you move the mouse off of the
  357.      frame, the frame moves to the bottom of the stack of X windows.
  358.  
  359.      The command `auto-lower-mode' has no effect on auto-lower
  360.      implemented by the X window manager.  To control that, you must use
  361.      the appropriate window manager features.
  362.  
  363. `M-x set-default-font RET FONT RET'
  364.      Specify font FONT as the default for the selected frame.  *Note
  365.      Font X::, for ways to list the available fonts on your system.
  366.  
  367.      You can also set a frame's default font through a pop-up menu.
  368.      Press `C-Mouse-3' to activate this menu.
  369.  
  370.    In Emacs versions that use an X toolkit, the color-setting and
  371. font-setting functions don't affect menus and the menu bar, since they
  372. are displayed by their own widget classes.  To change the appearance of
  373. the menus and menu bar, you must use X resources (*note Resources X::.).
  374. *Note Colors X::, regarding colors.  *Note Font X::, regarding choice of
  375. font.
  376.  
  377.    For information on frame parameters and customization, see *Note
  378. Frame Parameters: (elisp)Frame Parameters.
  379.  
  380. 
  381. File: emacs,  Node: Scroll Bars,  Next: Menu Bars,  Prev: Frame Parameters,  Up: Frames
  382.  
  383. Scroll Bars
  384. ===========
  385.  
  386.    When using X, Emacs normally makes a "scroll bar" at the right of
  387. each Emacs window.  The scroll bar runs the height of the window, and
  388. shows a moving rectangular inner box which represents the portion of the
  389. buffer currently displayed.  The entire height of the scroll bar
  390. represents the entire length of the buffer.
  391.  
  392.    You can use `Mouse-2' (normally, the middle button) in the scroll
  393. bar to move or drag the inner box up and down.  If you move it to the
  394. top of the scroll bar, you see the top of the buffer.  If you move it to
  395. the bottom of the scroll bar, you see the bottom of the buffer.
  396.  
  397.    The left and right buttons in the scroll bar scroll by controlled
  398. increments.  `Mouse-1' (normally, the left button) moves the line at
  399. the level where you click up to the top of the window.  `Mouse-3'
  400. (normally, the right button) moves the line at the top of the window
  401. down to the level where you click.  By clicking repeatedly in the same
  402. place, you can scroll by the same distance over and over.
  403.  
  404.    Aside from scrolling, you can also click `C-Mouse-2' in the scroll
  405. bar to split a window vertically.  The split occurs on the line where
  406. you click.
  407.  
  408.    You can enable or disable Scroll Bar mode with the command `M-x
  409. scroll-bar-mode'.  With no argument, it toggles the use of scroll bars.
  410. With an argument, it turns use of scroll bars on if and only if the
  411. argument is positive.  This command applies to all frames, including
  412. frames yet to be created.
  413.  
  414.    To enable or disable scroll bars for just the selected frame, use the
  415. `M-x toggle-scroll-bar' command.
  416.  
  417. 
  418. File: emacs,  Node: Menu Bars,  Next: Faces,  Prev: Scroll Bars,  Up: Frames
  419.  
  420. Menu Bars
  421. =========
  422.  
  423.    By default, each Emacs frame has a menu bar at the top which you can
  424. use to perform certain common operations.  There's no need to describe
  425. them in detail here, as you can more easily see for yourself; also, we
  426. may change them and add to them in subsequent Emacs versions.
  427.  
  428.    Each of the operations in the menu bar is bound to an ordinary Emacs
  429. command which you can invoke equally well with `M-x' or with its own
  430. key bindings.  The menu lists one equivalent key binding (if the command
  431. has any) at the right margin.  To see the command's name and
  432. documentation, type `C-h k' and then select the menu bar item you are
  433. interested in.
  434.  
  435.    You can turn display of menu bars on or off with `M-x menu-bar-mode'.
  436. With no argument, this command toggles Menu Bar mode, a minor mode.
  437. With an argument, the command turns Menu Bar mode on if the argument is
  438. positive, off if the argument is not positive.
  439.  
  440. 
  441. File: emacs,  Node: Faces,  Next: Modifying Faces,  Prev: Menu Bars,  Up: Frames
  442.  
  443. Using Multiple Typefaces
  444. ========================
  445.  
  446.    When using Emacs with X, you can set up multiple styles of displaying
  447. characters.  The aspects of style that you can control are the type
  448. font, the foreground color, the background color, and whether to
  449. underline.  Emacs 19.26 does not support faces on MS-DOS, but future
  450. versions will support them partially (*note MS-DOS::.).
  451.  
  452.    The way you control display style is by defining named "faces".
  453. Each face can specify a type font, a foreground color, a background
  454. color, and an underline flag; but it does not have to specify all of
  455. them.
  456.  
  457.    The style of display used for a given character in the text is
  458. determined by combining several faces.  Which faces to use is always set
  459. up by Lisp programs, at present, by means of text properties and
  460. overlays.  Any aspect of the display style that isn't specified by
  461. overlays or text properties comes from the frame itself.
  462.  
  463.    To see what faces are currently defined, and what they look like,
  464. type `M-x list-faces-display'.  It's possible for a given face to look
  465. different in different frames; this command shows the appearance in the
  466. frame in which you type it.  Here's a list of the standardly defined
  467. faces:
  468.  
  469. `default'
  470.      This face is used for ordinary text that doesn't specify any other
  471.      face.
  472.  
  473. `modeline'
  474.      This face is used for mode lines.  By default, it's set up as the
  475.      inverse of the default face.  *Note Display Vars::.
  476.  
  477. `highlight'
  478.      This face is used for highlighting portions of text, in various
  479.      modes.
  480.  
  481. `region'
  482.      This face is used for displaying a selected region.
  483.  
  484. `secondary-selection'
  485.      This face is used for displaying a secondary selection (*note
  486.      Secondary Selection::.).
  487.  
  488. `bold'
  489.      This face uses a bold variant of the default font, if it has one.
  490.  
  491. `italic'
  492.      This face uses an italic variant of the default font, if it has
  493.      one.
  494.  
  495. `bold-italic'
  496.      This face uses a bold italic variant of the default font, if it
  497.      has one.
  498.  
  499. `underline'
  500.      This face underlines text.
  501.  
  502.    When Transient Mark mode is enabled, the text of the region is
  503. highlighted when the mark is active.  This uses the face named
  504. `region'; you can control the style of highlighting by changing the
  505. style of this face (*note Modifying Faces::.).  *Note Transient Mark::,
  506. for more information about Transient Mark mode and activation and
  507. deactivation of the mark.
  508.  
  509.    One easy way to use faces is to turn on Font-Lock mode.  This minor
  510. mode, which is always local to a particular buffer, arranges to choose
  511. faces according to the syntax of the text you are editing.  It can
  512. recognize comments and strings in any major mode; for several major
  513. modes, it can also recognize and properly highlight various other
  514. important parts of the text.  To get the full benefit of Font-Lock mode,
  515. you need to choose a default font which has bold, italic, and
  516. bold-italic variants.
  517.  
  518. 
  519. File: emacs,  Node: Modifying Faces,  Next: Misc X,  Prev: Faces,  Up: Frames
  520.  
  521. Modifying Faces
  522. ===============
  523.  
  524.    Here are the commands users can use to change the font of a face:
  525.  
  526. `M-x set-face-font RET FACE RET FONT RET'
  527.      Change face FACE to use font FONT.  *Note Font X::, for more
  528.      information about font naming under X.
  529.  
  530. `M-x make-face-bold RET FACE RET'
  531.      Convert face FACE to use a bold version of its current font.
  532.  
  533. `M-x make-face-italic RET FACE RET'
  534.      Convert face FACE to use a italic version of its current font.
  535.  
  536. `M-x make-face-bold-italic RET FACE RET'
  537.      Convert face FACE to use a bold-italic version of its current font.
  538.  
  539. `M-x make-face-unbold RET FACE RET'
  540.      Convert face FACE to use a non-bold version of its current font.
  541.  
  542. `M-x make-face-unitalic RET FACE RET'
  543.      Convert face FACE to use a non-italic version of its current font.
  544.  
  545.    Here are the commands for setting the colors and underline flag of a
  546. face:
  547.  
  548. `M-x set-face-foreground RET FACE RET COLOR RET'
  549.      Use color COLOR for the foreground of characters in face FACE.
  550.  
  551. `M-x set-face-background RET FACE RET COLOR RET'
  552.      Use color COLOR for the background of characters in face FACE.
  553.  
  554. `M-x set-face-underline-p RET FACE RET FLAG RET'
  555.      Specify whether to underline characters in face FACE.
  556.  
  557. `M-x invert-face RET FACE RET'
  558.      Swap the foreground and background colors of face FACE.
  559.  
  560.    You can also use X resources to specify attributes of particular
  561. faces.  *Note Resources X::.
  562.  
  563. 
  564. File: emacs,  Node: Misc X,  Prev: Modifying Faces,  Up: Frames
  565.  
  566. Miscellaneous X Window Features
  567. ===============================
  568.  
  569.    The following commands do user-level management of frames under a
  570. window system:
  571.  
  572. `C-z'
  573.      To iconify the selected Emacs frame, type `C-z'
  574.      (`iconify-or-deiconify-frame').  The normal meaning of `C-z', to
  575.      suspend Emacs, is not useful under a window system, so it has a
  576.      different binding in that case.
  577.  
  578.      If you type this command on an Emacs frame's icon, it deiconifies
  579.      the frame.
  580.  
  581. `C-x 5 0'
  582.      To delete the selected frame, type `C-x 5 0' (`delete-frame').
  583.      This is not allowed if there is only one frame.
  584.  
  585. `M-x transient-mark-mode'
  586.      Under X Windows, when Transient Mark mode is enabled, Emacs
  587.      highlights the region when the mark is active.  This feature is
  588.      the main motive for using Transient Mark mode.  To toggle the
  589.      state of this mode, use the command `M-x transient-mark-mode'.
  590.      *Note Mark::.
  591.  
  592. 
  593. File: emacs,  Node: Major Modes,  Next: Indentation,  Prev: Frames,  Up: Top
  594.  
  595. Major Modes
  596. ***********
  597.  
  598.    Emacs provides many alternative "major modes", each of which
  599. customizes Emacs for editing text of a particular sort.  The major modes
  600. are mutually exclusive, and each buffer has one major mode at any time.
  601. The mode line normally shows the name of the current major mode, in
  602. parentheses (*note Mode Line::.).
  603.  
  604.    The least specialized major mode is called "Fundamental mode".  This
  605. mode has no mode-specific redefinitions or variable settings, so that
  606. each Emacs command behaves in its most general manner, and each option
  607. is in its default state.  For editing text of a specific type that
  608. Emacs knows about, such as Lisp code or English text, you should switch
  609. to the appropriate major mode, such as Lisp mode or Text mode.
  610.  
  611.    Selecting a major mode changes the meanings of a few keys to become
  612. more specifically adapted to the language being edited.  The ones which
  613. are changed frequently are TAB, DEL, and LFD.  The prefix key `C-c'
  614. normally contains mode-specific commands.  In addition, the commands
  615. which handle comments use the mode to determine how comments are to be
  616. delimited.  Many major modes redefine the syntactical properties of
  617. characters appearing in the buffer.  *Note Syntax::.
  618.  
  619.    The major modes fall into three major groups.  Lisp mode (which has
  620. several variants), C mode, Fortran mode and others are for specific
  621. programming languages.  Text mode, Nroff mode, TeX mode and Outline
  622. mode are for editing English text.  The remaining major modes are not
  623. intended for use on users' files; they are used in buffers created for
  624. specific purposes by Emacs, such as Dired mode for buffers made by Dired
  625. (*note Dired::.), and Mail mode for buffers made by `C-x m' (*note
  626. Sending Mail::.), and Shell mode for buffers used for communicating
  627. with an inferior shell process (*note Interactive Shell::.).
  628.  
  629.    Most programming language major modes specify that only blank lines
  630. separate paragraphs.  This is to make the paragraph commands useful.
  631. (*Note Paragraphs::.)  They also cause Auto Fill mode to use the
  632. definition of TAB to indent the new lines it creates.  This is because
  633. most lines in a program are usually indented.  (*Note Indentation::.)
  634.  
  635. * Menu:
  636.  
  637. * Choosing Modes::     How major modes are specified or chosen.
  638.  
  639. 
  640. File: emacs,  Node: Choosing Modes,  Prev: Major Modes,  Up: Major Modes
  641.  
  642. How Major Modes are Chosen
  643. ==========================
  644.  
  645.    You can select a major mode explicitly for the current buffer, but
  646. most of the time Emacs determines which mode to use based on the file
  647. name or on special text in the file.
  648.  
  649.    Explicit selection of a new major mode is done with a `M-x' command.
  650. From the name of a major mode, add `-mode' to get the name of a command
  651. to select that mode.  Thus, you can enter Lisp mode by executing `M-x
  652. lisp-mode'.
  653.  
  654.    When you visit a file, Emacs usually chooses the right major mode
  655. based on the file's name.  For example, files whose names end in `.c'
  656. are edited in C mode.  The correspondence between file names and major
  657. mode is controlled by the variable `auto-mode-alist'.  Its value is a
  658. list in which each element has the form
  659.  
  660.      (REGEXP . MODE-FUNCTION)
  661.  
  662. For example, one element normally found in the list has the form
  663. `("\\.c\\'" . c-mode)', and it is responsible for selecting C mode for
  664. files whose names end in `.c'.  (Note that `\\' is needed in Lisp
  665. syntax to include a `\' in the string, which is needed to suppress the
  666. special meaning of `.' in regexps.)  The only practical way to change
  667. this variable is with Lisp code.
  668.  
  669.    You can specify which major mode should be used for editing a certain
  670. file by a special sort of text in the first nonblank line of the file.
  671. The mode name should appear in this line both preceded and followed by
  672. `-*-'.  Other text may appear on the line as well.  For example,
  673.  
  674.      ;-*-Lisp-*-
  675.  
  676. tells Emacs to use Lisp mode.  Such an explicit specification overrides
  677. any defaulting based on the file name.  Note how the semicolon is used
  678. to make Lisp treat this line as a comment.
  679.  
  680.    Another format of mode specification is
  681.  
  682.      -*-Mode: MODENAME;-*-
  683.  
  684. which allows you to specify local variables as well, like this:
  685.  
  686.      -*- mode: MODENAME; VAR: VALUE; ... -*-
  687.  
  688. *Note File Variables::, for more information about this.
  689.  
  690.    When you visit a file that does not specify a major mode to use, or
  691. when you create a new buffer with `C-x b', the variable
  692. `default-major-mode' specifies which major mode to use.  Normally its
  693. value is the symbol `fundamental-mode', which specifies Fundamental
  694. mode.  If `default-major-mode' is `nil', the major mode is taken from
  695. the previously selected buffer.
  696.  
  697.    If you change the major mode of a buffer, you can go back to the
  698. major mode Emacs would choose automatically: use the command `M-x
  699. normal-mode' to do this.  This is the same function that `find-file'
  700. calls to choose the major mode.  It also processes the file's local
  701. variables list if any.
  702.  
  703. 
  704. File: emacs,  Node: Indentation,  Next: Text,  Prev: Major Modes,  Up: Top
  705.  
  706. Indentation
  707. ***********
  708.  
  709.    This chapter describes the Emacs commands that add, remove, or
  710. adjust indentation.
  711.  
  712. `TAB'
  713.      Indent current line "appropriately" in a mode-dependent fashion.
  714.  
  715. `LFD'
  716.      Perform RET followed by TAB (`newline-and-indent').
  717.  
  718. `M-^'
  719.      Merge two lines (`delete-indentation').  This would cancel out the
  720.      effect of LFD.
  721.  
  722. `C-M-o'
  723.      Split line at point; text on the line after point becomes a new
  724.      line indented to the same column that it now starts in
  725.      (`split-line').
  726.  
  727. `M-m'
  728.      Move (forward or back) to the first nonblank character on the
  729.      current line (`back-to-indentation').
  730.  
  731. `C-M-\'
  732.      Indent several lines to same column (`indent-region').
  733.  
  734. `C-x TAB'
  735.      Shift block of lines rigidly right or left (`indent-rigidly').
  736.  
  737. `M-i'
  738.      Indent from point to the next prespecified tab stop column
  739.      (`tab-to-tab-stop').
  740.  
  741. `M-x indent-relative'
  742.      Indent from point to under an indentation point in the previous
  743.      line.
  744.  
  745.    Most programming languages have some indentation convention.  For
  746. Lisp code, lines are indented according to their nesting in
  747. parentheses.  The same general idea is used for C code, though many
  748. details are different.
  749.  
  750.    Whatever the language, to indent a line, use the TAB command.  Each
  751. major mode defines this command to perform the sort of indentation
  752. appropriate for the particular language.  In Lisp mode, TAB aligns the
  753. line according to its depth in parentheses.  No matter where in the
  754. line you are when you type TAB, it aligns the line as a whole.  In C
  755. mode, TAB implements a subtle and sophisticated indentation style that
  756. knows about many aspects of C syntax.
  757.  
  758.    In Text mode, TAB runs the command `tab-to-tab-stop', which indents
  759. to the next tab stop column.  You can set the tab stops with `M-x
  760. edit-tab-stops'.
  761.  
  762. * Menu:
  763.  
  764. * Indentation Commands::  Various commands and techniques for indentation.
  765. * Tab Stops::             You can set arbitrary "tab stops" and then
  766.                             indent to the next tab stop when you want to.
  767. * Just Spaces::           You can request indentation using just spaces.
  768.  
  769. 
  770. File: emacs,  Node: Indentation Commands,  Next: Tab Stops,  Prev: Indentation,  Up: Indentation
  771.  
  772. Indentation Commands and Techniques
  773. ===================================
  774.  
  775.    To move over the indentation on a line, do `M-m'
  776. (`back-to-indentation').  This command, given anywhere on a line,
  777. positions point at the first nonblank character on the line.
  778.  
  779.    To insert an indented line before the current line, do `C-a C-o
  780. TAB'.  To make an indented line after the current line, use `C-e LFD'.
  781.  
  782.    If you just want to insert a tab character in the buffer, you can
  783. type `C-q TAB'.
  784.  
  785.    `C-M-o' (`split-line') moves the text from point to the end of the
  786. line vertically down, so that the current line becomes two lines.
  787. `C-M-o' first moves point forward over any spaces and tabs.  Then it
  788. inserts after point a newline and enough indentation to reach the same
  789. column point is on.  Point remains before the inserted newline; in this
  790. regard, `C-M-o' resembles `C-o'.
  791.  
  792.    To join two lines cleanly, use the `M-^' (`delete-indentation')
  793. command.  It deletes the indentation at the front of the current line,
  794. and the line boundary as well, replacing them with a single space.  As
  795. a special case (useful for Lisp code) the single space is omitted if
  796. the characters to be joined are consecutive open parentheses or closing
  797. parentheses, or if the junction follows another newline.  To delete
  798. just the indentation of a line, go to the beginning of the line and use
  799. `M-\' (`delete-horizontal-space'), which deletes all spaces and tabs
  800. around the cursor.
  801.  
  802.    If you have a fill prefix, `M-^' deletes the fill prefix if it
  803. appears after the newline that is deleted.  *Note Fill Prefix::.
  804.  
  805.    There are also commands for changing the indentation of several lines
  806. at once.  `C-M-\' (`indent-region') applies to all the lines that begin
  807. in the region; it indents each line in the "usual" way, as if you had
  808. typed TAB at the beginning of the line.  A numeric argument specifies
  809. the column to indent to, and each line is shifted left or right so that
  810. its first nonblank character appears in that column.  `C-x TAB'
  811. (`indent-rigidly') moves all of the lines in the region right by its
  812. argument (left, for negative arguments).  The whole group of lines
  813. moves rigidly sideways, which is how the command gets its name.
  814.  
  815.    `M-x indent-relative' indents at point based on the previous line
  816. (actually, the last nonempty line).  It inserts whitespace at point,
  817. moving point, until it is underneath an indentation point in the
  818. previous line.  An indentation point is the end of a sequence of
  819. whitespace or the end of the line.  If point is farther right than any
  820. indentation point in the previous line, the whitespace before point is
  821. deleted and the first indentation point then applicable is used.  If no
  822. indentation point is applicable even then, `indent-relative' runs
  823. `tab-to-tab-stop' (*note Tab Stops::.).
  824.  
  825.    `indent-relative' is the definition of TAB in Indented Text mode.
  826. *Note Text::.
  827.  
  828. 
  829. File: emacs,  Node: Tab Stops,  Next: Just Spaces,  Prev: Indentation Commands,  Up: Indentation
  830.  
  831. Tab Stops
  832. =========
  833.  
  834.    For typing in tables, you can use Text mode's definition of TAB,
  835. `tab-to-tab-stop'.  This command inserts indentation before point,
  836. enough to reach the next tab stop column.  If you are not in Text mode,
  837. this command can be found on the key `M-i'.
  838.  
  839.    You can specify the tab stops used by `M-i'.  They are stored in a
  840. variable called `tab-stop-list', as a list of column-numbers in
  841. increasing order.
  842.  
  843.    The convenient way to set the tab stops is with `M-x edit-tab-stops',
  844. which creates and selects a buffer containing a description of the tab
  845. stop settings.  You can edit this buffer to specify different tab
  846. stops, and then type `C-c C-c' to make those new tab stops take effect.
  847. In the tab stop buffer, `C-c C-c' runs the function
  848. `edit-tab-stops-note-changes' rather than its usual definition
  849. `save-buffer'.  `edit-tab-stops' records which buffer was current when
  850. you invoked it, and stores the tab stops back in that buffer; normally
  851. all buffers share the same tab stops and changing them in one buffer
  852. affects all, but if you happen to make `tab-stop-list' local in one
  853. buffer then `edit-tab-stops' in that buffer will edit the local
  854. settings.
  855.  
  856.    Here is what the text representing the tab stops looks like for
  857. ordinary tab stops every eight columns.
  858.  
  859.              :       :       :       :       :       :
  860.      0         1         2         3         4
  861.      0123456789012345678901234567890123456789012345678
  862.      To install changes, type C-c C-c
  863.  
  864.    The first line contains a colon at each tab stop.  The remaining
  865. lines are present just to help you see where the colons are and know
  866. what to do.
  867.  
  868.    Note that the tab stops that control `tab-to-tab-stop' have nothing
  869. to do with displaying tab characters in the buffer.  *Note Display
  870. Vars::, for more information on that.
  871.  
  872. 
  873. File: emacs,  Node: Just Spaces,  Prev: Tab Stops,  Up: Indentation
  874.  
  875. Tabs vs. Spaces
  876. ===============
  877.  
  878.    Emacs normally uses both tabs and spaces to indent lines.  If you
  879. prefer, all indentation can be made from spaces only.  To request this,
  880. set `indent-tabs-mode' to `nil'.  This is a per-buffer variable;
  881. altering the variable affects only the current buffer, but there is a
  882. default value which you can change as well.  *Note Locals::.
  883.  
  884.    There are also commands to convert tabs to spaces or vice versa,
  885. always preserving the columns of all nonblank text.  `M-x tabify' scans
  886. the region for sequences of spaces, and converts sequences of at least
  887. three spaces to tabs if that can be done without changing indentation.
  888. `M-x untabify' changes all tabs in the region to appropriate numbers of
  889. spaces.
  890.  
  891. 
  892. File: emacs,  Node: Text,  Next: Programs,  Prev: Indentation,  Up: Top
  893.  
  894. Commands for Human Languages
  895. ****************************
  896.  
  897.    The term "text" has two widespread meanings in our area of the
  898. computer field.  One is data that is a sequence of characters.  Any file
  899. that you edit with Emacs is text, in this sense of the word.  The other
  900. meaning is more restrictive: a sequence of characters in a human
  901. language for humans to read (possibly after processing by a text
  902. formatter), as opposed to a program or commands for a program.
  903.  
  904.    Human languages have syntactic/stylistic conventions that can be
  905. supported or used to advantage by editor commands: conventions involving
  906. words, sentences, paragraphs, and capital letters.  This chapter
  907. describes Emacs commands for all of these things.  There are also
  908. commands for "filling", which means rearranging the lines of a
  909. paragraph to be approximately equal in length.  The commands for moving
  910. over and killing words, sentences and paragraphs, while intended
  911. primarily for editing text, are also often useful for editing programs.
  912.  
  913.    Emacs has several major modes for editing human language text.  If
  914. the file contains text pure and simple, use Text mode, which customizes
  915. Emacs in small ways for the syntactic conventions of text.  For text
  916. which contains embedded commands for text formatters, Emacs has other
  917. major modes, each for a particular text formatter.  Thus, for input to
  918. TeX, you would use TeX mode; for input to nroff, Nroff mode.  Outline
  919. mode provides special commands for operating on text with an outline
  920. structure.
  921.  
  922. * Menu:
  923.  
  924. * Words::         Moving over and killing words.
  925. * Sentences::     Moving over and killing sentences.
  926. * Paragraphs::      Moving over paragraphs.
  927. * Pages::      Moving over pages.
  928. * Filling::       Filling or justifying text.
  929. * Case::          Changing the case of text.
  930. * Text Mode::     The major modes for editing text files.
  931. * Outline Mode::  The major mode for editing outlines.
  932. * TeX Mode::      The major modes for editing input to the formatter TeX.
  933. * Nroff Mode::    The major mode for editing input to the formatter nroff.
  934.  
  935. 
  936. File: emacs,  Node: Words,  Next: Sentences,  Up: Text
  937.  
  938. Words
  939. =====
  940.  
  941.    Emacs has commands for moving over or operating on words.  By
  942. convention, the keys for them are all Meta characters.
  943.  
  944. `M-f'
  945.      Move forward over a word (`forward-word').
  946.  
  947. `M-b'
  948.      Move backward over a word (`backward-word').
  949.  
  950. `M-d'
  951.      Kill up to the end of a word (`kill-word').
  952.  
  953. `M-DEL'
  954.      Kill back to the beginning of a word (`backward-kill-word').
  955.  
  956. `M-@'
  957.      Mark the end of the next word (`mark-word').
  958.  
  959. `M-t'
  960.      Transpose two words or drag a word across other words
  961.      (`transpose-words').
  962.  
  963.    Notice how these keys form a series that parallels the
  964. character-based `C-f', `C-b', `C-d', `C-t' and DEL.  `M-@' is cognate
  965. to `C-@', which is an alias for `C-SPC'.
  966.  
  967.    The commands `M-f' (`forward-word') and `M-b' (`backward-word') move
  968. forward and backward over words.  These Meta characters are thus
  969. analogous to the corresponding control characters, `C-f' and `C-b',
  970. which move over single characters in the text.  The analogy extends to
  971. numeric arguments, which serve as repeat counts.  `M-f' with a negative
  972. argument moves backward, and `M-b' with a negative argument moves
  973. forward.  Forward motion stops right after the last letter of the word,
  974. while backward motion stops right before the first letter.
  975.  
  976.    `M-d' (`kill-word') kills the word after point.  To be precise, it
  977. kills everything from point to the place `M-f' would move to.  Thus, if
  978. point is in the middle of a word, `M-d' kills just the part after
  979. point.  If some punctuation comes between point and the next word, it
  980. is killed along with the word.  (If you wish to kill only the next word
  981. but not the punctuation before it, simply do `M-f' to get the end, and
  982. kill the word backwards with `M-DEL'.) `M-d' takes arguments just like
  983. `M-f'.
  984.  
  985.    `M-DEL' (`backward-kill-word') kills the word before point.  It
  986. kills everything from point back to where `M-b' would move to.  If
  987. point is after the space in `FOO, BAR', then `FOO, ' is killed.  (If
  988. you wish to kill just `FOO', do `M-b M-d' instead of `M-DEL'.)
  989.  
  990.    `M-t' (`transpose-words') exchanges the word before or containing
  991. point with the following word.  The delimiter characters between the
  992. words do not move.  For example, `FOO, BAR' transposes into `BAR, FOO'
  993. rather than `BAR FOO,'.  *Note Transpose::, for more on transposition
  994. and on arguments to transposition commands.
  995.  
  996.    To operate on the next N words with an operation which applies
  997. between point and mark, you can either set the mark at point and then
  998. move over the words, or you can use the command `M-@' (`mark-word')
  999. which does not move point, but sets the mark where `M-f' would move to.
  1000. `M-@' accepts a numeric argument that says how many words to scan for
  1001. the place to put the mark.  In Transient Mark mode, this command
  1002. activates the mark.
  1003.  
  1004.    The word commands' understanding of syntax is completely controlled
  1005. by the syntax table.  Any character can, for example, be declared to be
  1006. a word delimiter.  *Note Syntax::.
  1007.  
  1008. 
  1009. File: emacs,  Node: Sentences,  Next: Paragraphs,  Prev: Words,  Up: Text
  1010.  
  1011. Sentences
  1012. =========
  1013.  
  1014.    The Emacs commands for manipulating sentences and paragraphs are
  1015. mostly on Meta keys, so as to be like the word-handling commands.
  1016.  
  1017. `M-a'
  1018.      Move back to the beginning of the sentence (`backward-sentence').
  1019.  
  1020. `M-e'
  1021.      Move forward to the end of the sentence (`forward-sentence').
  1022.  
  1023. `M-k'
  1024.      Kill forward to the end of the sentence (`kill-sentence').
  1025.  
  1026. `C-x DEL'
  1027.      Kill back to the beginning of the sentence
  1028.      (`backward-kill-sentence').
  1029.  
  1030.    The commands `M-a' and `M-e' (`backward-sentence' and
  1031. `forward-sentence') move to the beginning and end of the current
  1032. sentence, respectively.  They were chosen to resemble `C-a' and `C-e',
  1033. which move to the beginning and end of a line.  Unlike them, `M-a' and
  1034. `M-e' if repeated or given numeric arguments move over successive
  1035. sentences.
  1036.  
  1037.    Moving backward over a sentence places point just before the first
  1038. character of the sentence; moving forward places point right after the
  1039. punctuation that ends the sentence.  Neither one moves over the
  1040. whitespace at the sentence boundary.
  1041.  
  1042.    Just as `C-a' and `C-e' have a kill command, `C-k', to go with them,
  1043. so `M-a' and `M-e' have a corresponding kill command `M-k'
  1044. (`kill-sentence') which kills from point to the end of the sentence.
  1045. With minus one as an argument it kills back to the beginning of the
  1046. sentence.  Larger arguments serve as a repeat count.  There is also a
  1047. command, `C-x DEL' (`backward-kill-sentence'), for killing back to the
  1048. beginning of a sentence.  This command is useful when you change your
  1049. mind in the middle of composing text.
  1050.  
  1051.    The sentence commands assume that you follow the American typist's
  1052. convention of putting two spaces at the end of a sentence; they consider
  1053. a sentence to end wherever there is a `.', `?' or `!' followed by the
  1054. end of a line or two spaces, with any number of `)', `]', `'', or `"'
  1055. characters allowed in between.  A sentence also begins or ends wherever
  1056. a paragraph begins or ends.
  1057.  
  1058.    The variable `sentence-end' controls recognition of the end of a
  1059. sentence.  It is a regexp that matches the last few characters of a
  1060. sentence, together with the whitespace following the sentence.  Its
  1061. normal value is
  1062.  
  1063.      "[.?!][]\"')]*\\($\\|\t\\|  \\)[ \t\n]*"
  1064.  
  1065. This example is explained in the section on regexps.  *Note Regexps::.
  1066.  
  1067.    If you want to use just one space between sentences, you should set
  1068. `sentence-end' to this value:
  1069.  
  1070.      "[.?!][]\"')]*\\($\\|\t\\| \\)[ \t\n]*"
  1071.  
  1072. You should also set the variable `sentence-end-double-space' to `nil'
  1073. so that the fill commands expect and leave just one space at the end of
  1074. a sentence.  Note that this makes it impossible to distinguish between
  1075. periods that end sentences and those that indicate abbreviations.
  1076.  
  1077. 
  1078. File: emacs,  Node: Paragraphs,  Next: Pages,  Prev: Sentences,  Up: Text
  1079.  
  1080. Paragraphs
  1081. ==========
  1082.  
  1083.    The Emacs commands for manipulating paragraphs are also Meta keys.
  1084.  
  1085. `M-{'
  1086.      Move back to previous paragraph beginning (`backward-paragraph').
  1087.  
  1088. `M-}'
  1089.      Move forward to next paragraph end (`forward-paragraph').
  1090.  
  1091. `M-h'
  1092.      Put point and mark around this or next paragraph
  1093.      (`mark-paragraph').
  1094.  
  1095.    `M-{' moves to the beginning of the current or previous paragraph,
  1096. while `M-}' moves to the end of the current or next paragraph.  Blank
  1097. lines and text formatter command lines separate paragraphs and are not
  1098. considered part of any paragraph.  Also, an indented line starts a new
  1099. paragraph.
  1100.  
  1101.    In major modes for programs (as opposed to Text mode), paragraphs
  1102. begin and end only at blank lines.  This makes the paragraph commands
  1103. continue to be useful even though there are no paragraphs per se.
  1104.  
  1105.    When there is a fill prefix, then paragraphs are delimited by all
  1106. lines which don't start with the fill prefix.  *Note Filling::.
  1107.  
  1108.    When you wish to operate on a paragraph, you can use the command
  1109. `M-h' (`mark-paragraph') to set the region around it.  Thus, for
  1110. example, `M-h C-w' kills the paragraph around or after point.  The
  1111. `M-h' command puts point at the beginning and mark at the end of the
  1112. paragraph point was in.  In Transient Mark mode, it activates the mark.
  1113. If point is between paragraphs (in a run of blank lines, or at a
  1114. boundary), the paragraph following point is surrounded by point and
  1115. mark.  If there are blank lines preceding the first line of the
  1116. paragraph, one of these blank lines is included in the region.
  1117.  
  1118.    The precise definition of a paragraph boundary is controlled by the
  1119. variables `paragraph-separate' and `paragraph-start'.  The value of
  1120. `paragraph-start' is a regexp that should match any line that either
  1121. starts or separates paragraphs.  The value of `paragraph-separate' is
  1122. another regexp that should match only lines that separate paragraphs
  1123. without being part of any paragraph.  Lines that start a new paragraph
  1124. and are contained in it must match only `paragraph-start', not
  1125. `paragraph-separate'.  For example, normally `paragraph-start' is `"^[
  1126. \t\n\f]"' and `paragraph-separate' is `"^[ \t\f]*$"'.
  1127.  
  1128.    Normally it is desirable for page boundaries to separate paragraphs.
  1129. The default values of these variables recognize the usual separator for
  1130. pages.
  1131.  
  1132. 
  1133. File: emacs,  Node: Pages,  Next: Filling,  Prev: Paragraphs,  Up: Text
  1134.  
  1135. Pages
  1136. =====
  1137.  
  1138.    Files are often thought of as divided into "pages" by the "formfeed"
  1139. character (ASCII control-L, octal code 014).  When you print hardcopy
  1140. for a file, this character forces a page break; thus, each page of the
  1141. file goes on a separate page on paper.  Most Emacs commands treat the
  1142. page-separator character just like any other character: you can insert
  1143. it with `C-q C-l', and delete it with DEL.  Thus, you are free to
  1144. paginate your file or not.  However, since pages are often meaningful
  1145. divisions of the file, Emacs provides commands to move over them and
  1146. operate on them.
  1147.  
  1148. `C-x ['
  1149.      Move point to previous page boundary (`backward-page').
  1150.  
  1151. `C-x ]'
  1152.      Move point to next page boundary (`forward-page').
  1153.  
  1154. `C-x C-p'
  1155.      Put point and mark around this page (or another page)
  1156.      (`mark-page').
  1157.  
  1158. `C-x l'
  1159.      Count the lines in this page (`count-lines-page').
  1160.  
  1161.    The `C-x [' (`backward-page') command moves point to immediately
  1162. after the previous page delimiter.  If point is already right after a
  1163. page delimiter, it skips that one and stops at the previous one.  A
  1164. numeric argument serves as a repeat count.  The `C-x ]' (`forward-page')
  1165. command moves forward past the next page delimiter.
  1166.  
  1167.    The `C-x C-p' command (`mark-page') puts point at the beginning of
  1168. the current page and the mark at the end.  The page delimiter at the
  1169. end is included (the mark follows it).  The page delimiter at the front
  1170. is excluded (point follows it).  `C-x C-p C-w' is a handy way to kill a
  1171. page to move it elsewhere.  If you move to another page delimiter with
  1172. `C-x [' and `C-x ]', then yank the killed page, all the pages will be
  1173. properly delimited once again.  The reason `C-x C-p' includes only the
  1174. following page delimiter in the region is to ensure that.
  1175.  
  1176.    A numeric argument to `C-x C-p' is used to specify which page to go
  1177. to, relative to the current one.  Zero means the current page.  One
  1178. means the next page, and -1 means the previous one.
  1179.  
  1180.    The `C-x l' command (`count-lines-page') is good for deciding where
  1181. to break a page in two.  It prints in the echo area the total number of
  1182. lines in the current page, and then divides it up into those preceding
  1183. the current line and those following, as in
  1184.  
  1185.      Page has 96 (72+25) lines
  1186.  
  1187. Notice that the sum is off by one; this is correct if point is not at
  1188. the beginning of a line.
  1189.  
  1190.    The variable `page-delimiter' controls where pages begin.  Its value
  1191. is a regexp that matches the beginning of a line that separates pages.
  1192. The normal value of this variable is `"^\f"', which matches a formfeed
  1193. character at the beginning of a line.
  1194.  
  1195. 
  1196. File: emacs,  Node: Filling,  Next: Case,  Prev: Pages,  Up: Text
  1197.  
  1198. Filling Text
  1199. ============
  1200.  
  1201.    "Filling" text means breaking it up into lines that fit a specified
  1202. width.  Emacs does filling in two ways.  In Auto Fill mode, inserting
  1203. text with self-inserting characters also automatically fills it.  There
  1204. are also explicit fill commands that you can use when editing text
  1205. leaves it unfilled.
  1206.  
  1207. * Menu:
  1208.  
  1209. * Auto Fill::      Auto Fill mode breaks long lines automatically.
  1210. * Fill Commands:: Commands to refill paragraphs and center lines.
  1211. * Fill Prefix::      Filling when every line is indented or in a comment, etc.
  1212.  
  1213.